package Methods;

import Form.LNode;
public class Solution {
    //计算树的高度

        public int height (LNode node){
            if (node == null) {
                return 0;
            } else {
                int l = height(node.getLchild());
                int r = height(node.getRchild());
                return l > r? (l + 1) : (r + 1);
            }
        }

    }
